package com.heima.article.service.impl;

import com.heima.apis.comment.ICommentClient;
import com.heima.article.service.CommentByService;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.mongo.comment.dtos.CommentDto;
import com.heima.mongo.comment.dtos.CommentLikeDto;
import com.heima.mongo.comment.dtos.CommentSaveDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CommentByServiceImpl implements CommentByService {
    @Autowired
    private ICommentClient iCommentClient;

    @Override
    public ResponseResult getSave(CommentSaveDto dto) {
        return iCommentClient.getSave(dto);
    }

    /**
     * 点赞
     *
     * @param dto
     * @return
     */
    @Override
    public ResponseResult like(CommentLikeDto dto) {
        return iCommentClient.like(dto);
    }

    /**
     * 查看评论列表
     *
     * @param dto
     */
    @Override
    public ResponseResult load(CommentDto dto) {
        return iCommentClient.load(dto);
    }
}
